{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>充值卡列表</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="">
            <div class="form-group">
                <!--<div class="col-xs-3">-->
                    <!--<input type="text" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入会员昵称/电话号码搜索">-->
                <!--</div>-->
                <!--<button type="submit" class="btn btn-color">搜索</button>-->
                <div class="col-xs-3">
                <a type="button" href="/admin/product/createCharge" class="btn btn-info">添加充值卡</a>
                </div>
            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">id</th>
                <th class="text-center">logo</th>
                <th class="text-center">客服二维码</th>
                <th class="text-center">充值卡名</th>
                <th class="text-center">价格</th>
                <th class="text-center">添加时间</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($list)}
            {foreach $list as $entity}
            <tr>
                <form class="form-horizontal" method="post" onsubmit="return false" role="form">
                    <td class="text-center">{$entity->id}</td>
                    <td class="text-center"><img src="{$entity->logo}" style="width: 80px;height: 80px;"></td>
                    <td class="text-center"><img src="{$entity->qrcode}" style="width: 80px;height: 80px;"></td>
                    <td class="text-center">{$entity->name}</td>
                    <td class="text-center">{$entity->price}</td>
                    <td class="text-center">{$entity->create_time}</td>
                    <td class="text-center">
                        <a href="{:url('product/chargeInfo',['id'=>$entity->id])}" class="btn btn-xs btn-info">编辑</a>
                        <a data-url="{:url('product/deleteCharge',['id'=>$entity->id])}" onclick="main.ajaxDelete(this)" data-msg="确定要删除此卡吗？" class="btn btn-xs btn-danger">删除</a>
                    </td>
                </form>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="5">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {$list->render()}
        </div>
    </div>
</section>
{/block}


{block name="footer"}

{/block}